package com.asion.qkan.ui.fragment;


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.asion.qkan.R;
import com.facebook.drawee.view.SimpleDraweeView;

import butterknife.BindView;
import butterknife.ButterKnife;


public class DescriptionFragment extends Fragment {


    @BindView(R.id.desc_text)
    TextView descText;
    @BindView(R.id.desc_img)
    SimpleDraweeView descImg;
    @BindView(R.id.desc_next1)
    ImageView descNext1;
    @BindView(R.id.desc_next2)
    TextView descNext2;
    @BindView(R.id.desc_name)
    TextView descName;

    public DescriptionFragment() {
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_description, container, false);
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        Bundle arguments = getArguments();
        String description = arguments.getString("description");
        String user_img_url = arguments.getString("user_img_url");
        String user_name = arguments.getString("user_name");
        descText.setText(description);
        descImg.setImageURI(user_img_url);
        descName.setText(user_name);
    }
}
